#ifndef MAP_H_
#define MAP_H_

#include <fstream>
#include <string>
#include <SFML/Graphics.hpp>
#include "Block.h"
#include "var_define.h"


using namespace std;
using namespace sf;


class Map {
	public:
		Map(string filename);

		void	loadMap();
		bool	finFichier();
		bool	canMoveOn(int x_origin, int y_origin, int direction);

		string	getID();
		string	getName();
		string	getDescription();
		int		getWidth();
		int		getHeight();
		Sprite	getSprite();


//		bool	isBlock(int x, y);	// Inutile pour le moment, ne pas tenir compte
		Block	getBlock(int x, int y);
		void    setBlock(Block b, int i, int j);
		void    setZone(int x, int y, int largeur, int hauteur,string image);


		void	setMap(Map map);

		void    setPnj(int i, int j, bool b);
		bool    getPnj(int i, int j);


	private:
		string	fileName;
		fstream	mapFile;
		string	name;
		string	des;
		int		x;
		int		y;
		Image	imgMap;
		Sprite	spriteMap;
		string	ground;
		Block**	blocks;

};

#endif
